package com.example.demo.aop.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import com.example.demo.aop.service.ICouponService;

@Api(tags = "3 AOP切面测试")
@RestController
public class CouponController {
    @Autowired
    ICouponService couponService;

    @ApiOperation(value = "测试接口deposit")
    @GetMapping("deposit")
    public String deposit(){
        couponService.deposit();
        return "ok";
    }

    @GetMapping("api/hi")
    public String hi(){
        System.out.println("api hi");
        return "ok";
    }
}
